<template>
  <el-radio-group size="small" @change="handleChange">
    <el-radio-button
      v-for="option in options"
      :key="field + option.value"
      :label="option.value"
      border
    >
      {{ option.label }}
    </el-radio-button>
  </el-radio-group>
</template>

<script setup lang="ts">
  defineOptions({
    name: 'MRadio',
  })

  const props = withDefaults(
    defineProps<{
      options: any[]
      field: string
    }>(),
    {
      options: () => [],
    }
  )
  console.log('MRadio props', props)

  // const emits = defineEmits<{
  //   (e: 'update:modelValue', data: string | number | boolean): void
  // }>()
  //
  const handleChange = (val: string | number | boolean) => {
    console.log('handleChange', val)
    // console.log('checkData', checkData.value)

    // emits('update:modelValue', val)
  }
</script>
